#include "Cashier.h"

#include "BankBranch.h"
#include "Client.h"

Cashier::Cashier(const string firstName, const  string lastName, int age, eGender gender, int salary, int numOfVacationDays)
	: Employee(firstName, lastName, age, gender,salary), numOfVacationDays(numOfVacationDays)
{

}
bool Cashier::depositMoney(Client& client, int money) const
{
	Transaction* tr = new Transaction(money, Transaction::eTransactionType::Deposite, *Date::Now());

	client.addTransaction(*tr);

	return true;
}

bool Cashier::withdrawMoney(Client& client, int money) const
{
	Transaction* tr = new Transaction(money, Transaction::eTransactionType::Withdrawal, *Date::Now());

	client.addTransaction(*tr);

	return true;
}
	
void Cashier::toOs(ostream& os, bool isFullPrint)	const
{
	os << "Cashier={CountVacationDays=" << numOfVacationDays ;
	if (isFullPrint)
	{
		os << "\n\t";
		Employee::toOs(os);
	}
	os << "}";
}

Cashier::~Cashier()
{
}